<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <title>img - load event</title>
</head>
<body>
<img id="img1" src="http://pic1.win4000.com/wallpaper/f/51c3bb99a21ea.jpg">
<p id="p1">loading...</p>
<script type="text/javascript">
    /*加载图片*/
    var img1.onload = function() {
        p1.innerHTML = 'loaded'
    }

</script>
</body>
</html>